<style>
    .poll-container {
        max-width: 800px;
        margin: 40px auto;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    
    .poll-header {
        background: linear-gradient(135deg, #6e8efb, #a777e3);
        color: white;
        padding: 20px;
        border-radius: 8px 8px 0 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .poll-header h2 {
        margin: 0;
        font-weight: 500;
    }
    
    .poll-list {
        background: white;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
        overflow: hidden;
    }
    
    .poll-item {
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.3s ease;
        display: block;
        text-decoration: none;
        color: #333;
    }
    
    .poll-item:hover {
        background: #f9f9f9;
        transform: translateX(5px);
    }
    
    .poll-item:last-child {
        border-bottom: none;
    }
    
    .poll-item::after {
        content: "→";
        float: right;
        color: #a777e3;
        font-weight: bold;
        transition: all 0.3s ease;
    }
    
    .poll-item:hover::after {
        transform: translateX(3px);
    }
    
    .no-polls {
        text-align: center;
        padding: 40px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
        max-width: 500px;
        margin: 40px auto;
        color: #666;
    }
    
    .no-polls-icon {
        font-size: 50px;
        color: #a777e3;
        margin-bottom: 20px;
    }

    /* 添加admin链接样式 */
    .admin-link {
        text-align: center;
        margin-top: 30px;
    }
    
    .admin-link a {
        color: #a777e3;
        text-decoration: none;
        font-size: 14px;
        padding: 8px 15px;
        border: 1px solid #a777e3;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .admin-link a:hover {
        background: #a777e3;
        color: white;
    }
</style>

{% load static %}

<link rel="stylesheet" href="{% static 'polls/style.css' %}">

{% if latest_question_list %}
<div class="poll-container">
    <div class="poll-header">
        <h2>请选择要投票的话题</h2>
    </div>
    <div class="poll-list">
        {% for question in latest_question_list %}
        <a href="{% url 'polls:detail' question.id %}" class="poll-item">
            {{ question.question_text }}
        </a>
        {% endfor %}
    </div>
</div>
{% else %}
<div class="no-polls">
    <div class="no-polls-icon">∅</div>
    <p>No polls are available at the moment.</p>
</div>
{% endif %}

<!-- 添加的admin链接 -->
<div class="admin-link">
    <a href="/admin/">管理员入口</a>
</div>